import {
  DashboardIcon,
  UsergroupIcon,
  ShopIcon,
  DiscountIcon,
  FileIcon,
  SettingIcon,
  CartIcon,
  ListIcon,
  CodeIcon,
} from 'tdesign-icons-vue-next';
import { shallowRef } from 'vue';

import Layout from '@/layouts/index.vue';

export default [

  {
    path: '/merchant',
    component: Layout,
    name: 'merchant',
    meta: {
      title: {
        zh_CN: '商户管理',
        en_US: 'Merchant Management',
      },
      icon: shallowRef(ShopIcon),
      orderNo: 2,
    },
    children: [
      {
        path: 'info',
        name: 'MerchantInfo',
        component: () => import('@/pages/userCenter/trade/merchant/page.vue'),
        meta: {
          title: {
            zh_CN: '商户信息',
            en_US: 'Merchant Info',
          },
        },
      },
      {
        path: 'staff',
        name: 'MerchantMember',
        component: () => import('@/pages/userCenter/trade/buyer/buyer/page.vue'),
        meta: {
          title: {
            zh_CN: '会员信息',
            en_US: 'Member Info',
          },
        },
      },
    ],
  },
  {
    path: '/goods',
    component: Layout,
    name: 'goods',
    meta: {
      title: {
        zh_CN: '商品中心',
        en_US: 'Goods Center',
      },
      orderNo: 3,
      icon: shallowRef(CartIcon),
    },
    children: [
      {
        path: 'list',
        name: 'GoodsList',
        component: () => import('@/pages/userCenter/trade/goods/goods/page.vue'),
        meta: {
          title: {
            zh_CN: '商品列表',
            en_US: 'Goods List',
          },
        },
      },
      {
        path: 'category',
        name: 'GoodsCategory',
        component: () => import('@/pages/userCenter/trade/goods/category/page.vue'),
        meta: {
          title: {
            zh_CN: '商品分类',
            en_US: 'Goods Category',
          },
        },
      },
      {
        path: 'brand',
        name: 'GoodsBrand',
        component: () => import('@/pages/userCenter/trade/goods/brand/page.vue'),
        meta: {
          title: {
            zh_CN: '商品品牌',
            en_US: 'Goods Brand',
          },
        },
      },
    ],
  },
  {
    path: '/trade',
    component: Layout,
    name: 'trade',
    meta: {
      title: {
        zh_CN: '交易中心',
        en_US: 'Trade Center',
      },
      icon: shallowRef(DashboardIcon),
      orderNo: 4,
    },
    children: [
      {
        path: 'order',
        name: 'TradeOrder',
        component: () => import('@/pages/userCenter/trade/tradeOrder/page.vue'),
        meta: {
          title: {
            zh_CN: '订单列表',
            en_US: 'Order List',
          },
        },
      },
      {
        path: 'express',
        name: 'TradeExpress',
        component: () => import('@/pages/userCenter/trade/express/page.vue'),
        meta: {
          title: {
            zh_CN: '配送管理',
            en_US: 'Express Management',
          },
        },
      },
    ],
  },
  {
    path: '/marketing',
    component: Layout,
    name: 'marketing',
    meta: {
      title: {
        zh_CN: '营销中心',
        en_US: 'Marketing Center',
      },
      icon: shallowRef(DiscountIcon),
      orderNo: 5,
    },
    children: [
      {
        path: 'card',
        name: 'MarketingCard',
        component: () => import('@/pages/userCenter/promotion/use/page.vue'),
        meta: {
          title: {
            zh_CN: '卡券核销',
            en_US: 'Card Verification',
          },
        },
      },
      {
        path: 'coupon',
        name: 'MarketingCoupon',
        component: () => import('@/pages/userCenter/promotion/coupon/page.vue'),
        meta: {
          title: {
            zh_CN: '优惠券',
            en_US: 'Coupon',
          },
        },
      },
      {
        path: 'profit',
        name: 'MarketingProfit',
        component: () => import('@/pages/userCenter/trade/buyer/profitSharing/page.vue'),
        meta: {
          title: {
            zh_CN: '用户分账',
            en_US: 'Profit Sharing',
          },
        },
      },
    ],
  },
  {
    path: '/content',
    component: Layout,
    name: 'content',
    meta: {
      title: {
        zh_CN: '内容管理',
        en_US: 'Content Management',
      },
      icon: shallowRef(FileIcon),
      orderNo: 6,
    },
    children: [
      {
        path: 'article',
        name: 'ContentArticle',
        component: () => import('@/pages/userCenter/content/article/page.vue'),
        meta: {
          title: {
            zh_CN: '文章管理',
            en_US: 'Article Management',
          },
        },
      },
      {
        path: 'archive',
        name: 'ContentArchive',
        component: () => import('@/pages/userCenter/content/category/page.vue'),
        meta: {
          title: {
            zh_CN: '栏目管理',
            en_US: 'Archive Management',
          },
        },
      },
    ],
  },
  {
    path: '/material',
    component: Layout,
    name: 'material',
    meta: {
      title: {
        zh_CN: '物料管理',
        en_US: 'Material Management',
      },
      orderNo: 7,
      icon: shallowRef(ListIcon),
    },
    children: [
      {
        path: 'list',
        name: 'MaterialList',
        component: () => import('@/pages/userCenter/material/material/page.vue'),
        meta: {
          title: {
            zh_CN: '物料管理',
            en_US: 'Material List',
          },
        },
      },
      {
        path: 'category',
        name: 'MaterialCategory',
        component: () => import('@/pages/userCenter/material/category/page.vue'),
        meta: {
          title: {
            zh_CN: '物料分类',
            en_US: 'Material Category',
          },
        },
      },
      {
        path: 'purchase',
        name: 'MaterialPurchase',
        component: () => import('@/pages/userCenter/material/purchase/page.vue'),
        meta: {
          title: {
            zh_CN: '采购管理',
            en_US: 'Purchase Management',
          },
        },
      },
      {
        path: 'warehouse',
        name: 'MaterialWarehouse',
        component: () => import('@/pages/userCenter/material/stock/page.vue'),
        meta: {
          title: {
            zh_CN: '库存管理',
            en_US: 'Warehouse Management',
          },
        },
      },
      {
        path: 'usage',
        name: 'MaterialUsage',
        component: () => import('@/pages/userCenter/material/consume/page.vue'),
        meta: {
          title: {
            zh_CN: '物料领用情况',
            en_US: 'Material Usage',
          },
        },
      },
    ],
  },
  {
    path: '/lowcode',
    component: Layout,
    name: 'lowcode',
    meta: {
      title: {
        zh_CN: '低代码',
        en_US: 'Lowcode',
      },
      icon: shallowRef(CodeIcon),
      orderNo: 88,
    },
    children: [
      {
        path: 'form',
        name: 'LowcodeForm',
        component: () => import('@/pages/userCenter/lowcode/form/page.vue'),
        meta: {
          title: {
            zh_CN: '表单管理',
            en_US: 'Form Management',
          },
        },
      },],
  },
  {
    path: '/org',
    component: Layout,
    name: 'org',
    meta: {
      title: {
        zh_CN: '组织机构',
        en_US: 'Organization',
      },
      icon: shallowRef(UsergroupIcon),
      orderNo: 88,
    },
    children: [
      {
        path: 'staff',
        name: 'OrganizationMember',
        component: () => import('@/pages/userCenter/oa/staff/page.vue'),
        meta: {
          title: {
            zh_CN: '成员管理',
            en_US: 'Member Management',
          },
        },
      },
      {
        path: 'org',
        name: 'OrganizationGroup',
        component: () => import('@/pages/userCenter/oa/org/page.vue'),
        meta: {
          title: {
            zh_CN: '组织管理',
            en_US: 'Group Management',
          },
        },
      },
      {
        path: 'dept',
        name: 'OrganizationDepartment',
        component: () => import('@/pages/userCenter/oa/dept/page.vue'),
        meta: {
          title: {
            zh_CN: '部门管理',
            en_US: 'Department Management',
          },
        },
      },
      {
        path: 'post',
        name: 'OrganizationPosition',
        component: () => import('@/pages/userCenter/oa/post/page.vue'),
        meta: {
          title: {
            zh_CN: '岗位管理',
            en_US: 'Post Management',
          },
        },
      },
    ],
  }, {
    path: '/center',
    component: Layout,
    redirect: '/center/user',
    name: 'center',
    meta: {
      title: {
        zh_CN: '系统管理',
        en_US: 'System Management',
      },
      icon: shallowRef(SettingIcon),
      orderNo: 99,
    },
    children: [
      {
        path: 'user',
        name: 'CenterUser',
        component: () => import('@/pages/userCenter/auth/user/page.vue'),
        meta: {
          title: {
            zh_CN: '用户管理',
            en_US: 'User Management',
          },
        },
      },
      {
        path: 'role',
        name: 'CenterRole',
        component: () => import('@/pages/userCenter/auth/role/page.vue'),
        meta: {
          title: {
            zh_CN: '角色管理',
            en_US: 'Role Management',
          },
        },
      },
      {
        path: 'menu',
        name: 'CenterMenu',
        component: () => import('@/pages/userCenter/auth/menu/page.vue'),
        meta: {
          title: {
            zh_CN: '菜单管理',
            en_US: 'Menu Management',
          },
        },
      },
      {
        path: 'notice',
        name: 'CenterNotice',
        component: () => import('@/pages/userCenter/notice/page.vue'),
        meta: {
          title: {
            zh_CN: '通知公告',
            en_US: 'Notifications',
          },
        },
      },
      {
        path: 'tag',
        name: 'CenterTag',
        component: () => import('@/pages/userCenter/tag/page.vue'),
        meta: {
          title: {
            zh_CN: '标签管理',
            en_US: 'Tag Management',
          },
        },
      },
    ],
  },
];

